package UserDao;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


//第一个简单的案例
public class TestUser {
    @Test
  public void testUserObject() {
      //加载spring配置文件，对象创建
        ApplicationContext context =
                new ClassPathXmlApplicationContext("ApplicationContext.xml");
      //获取创建对象
        UserDao UserDao = UserDao = (UserDao) context.getBean("UserDao");
      //输出“UserDao”
        System.out.println(UserDao);
      //调用方法输出save方法
        UserDao.save();

    }

}
